import React, { Component } from "react";
import "@/mock/mockLogin";
import { get } from "@/Utils/http";
import axios from "axios";
export default class Level extends Component {
  state = {
    user: "155",
    pwd: "666",
  };
  componentDidMount() {}

  loginBtn = () => {
    get("/app/xuyang/login", { a: "jiji" }).then((res) => {
      console.log(res);
      const val = res.data[0];
      if (this.state.user === val.user && this.state.pwd === val.pwd) {
        console.log("cehngg");
      }
    });
  };

  render() {
    return (
      <div>
        Level
        <input type="text" value={this.state.user} onChange={() => {}} />
        <input type="text" value={this.state.pwd} onChange={() => {}} />
        <button onClick={this.loginBtn}>登录</button>
      </div>
    );
  }
}
